import http from '@/utils/request'

// 获取订单信息
export function getOrderInfo(orderId) {
	return http.get('/user/orderDetail/summary/' + orderId)
}


export function payOrder(params) {
	return http.post('/user/order/buildprepay', params)
}

export function completePay(params) {
	return http.post('/user/order/completepay', params)
}

export function getMyCommentOrder(orderId) {
	return http.get('/user/order/comment/search/' + orderId)
}

export function commentMyOrder(params) {
	return http.post('/user/order/comment/create',params)
}

export function getWxpayStatus(params) {
	return http.post('/user/order/wxpay/status', params)
}

export function bindAddress(params) {
	return http.post('/user/order/bindaddress',params)
}

export function unBindAddress(orderId) {
	return http.post('/user/order/unbindaddress/' + orderId)
}

export function editRemark(params) {
	return http.post('/user/order/editremark',params)
}

export function orderTimeout(id) {
	return http.get('/user/order/timeout/' + id)
}

export function getMyCoupon(shopId) {
	return http.get('/user/prizeRecord/myCoupon/' + shopId)
}

export function getCouponByOrderId(orderId) {
	return http.get('/user/prizeRecord/findByOrderId/' + orderId)
}